﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Healz
{
    public partial class fSettings : Form
    {
        public fSettings()
        {
            InitializeComponent();
        }
        private void fSettings_FormClosing(object sender, FormClosingEventArgs e)
        {
            Healz.cSettings.Save();
            Druid.Main.cSettings.Save();

            this.Hide();
            e.Cancel = true;
        }



        private void fSettings_Load(object sender, EventArgs e)
        {
            // General
            DUDGeneralLogToWoW.Text = Healz.cSettings.WoWLog.ToString();

            // Druid Settings
            Rejuvenation = Druid.Main.cSettings.Rejuvenation_Percent;
            Regrowth = Druid.Main.cSettings.Regrowth_Percent;
            Lifebloom = Druid.Main.cSettings.Lifebloom_Percent;
            Swiftmend = Druid.Main.cSettings.Swiftmend_Percent;
            TreeofLife = Druid.Main.cSettings.TreeOfLife_Percent;
            TreeofLifePeople = Druid.Main.cSettings.TreeOfLife_People;
            Innervate = Druid.Main.cSettings.Innervate_Percent;
        }



        #region Druid

        private void NUDRejuvenation_ValueChanged(object sender, EventArgs e) { Rejuvenation = (int)NUDRejuvenation.Value; }
        private void NUDRegrowth_ValueChanged(object sender, EventArgs e) { Regrowth = (int)NUDRegrowth.Value; }
        private void NUDLifebloom_ValueChanged(object sender, EventArgs e) { Lifebloom = (int)NUDLifebloom.Value; }
        private void NUDSwiftmend_ValueChanged(object sender, EventArgs e) { Swiftmend = (int)NUDSwiftmend.Value; }
        private void NUDTree_ValueChanged(object sender, EventArgs e) { TreeofLife = (int)NUDTree.Value; }
        private void NUDTreePeople_ValueChanged(object sender, EventArgs e) { TreeofLifePeople = (int)NUDTreePeople.Value; }
        private void NUDInnervate_ValueChanged(object sender, EventArgs e) { Innervate = (int)NUDInnervate.Value; }

        #region "Get Set Spells"
        public int Rejuvenation
        {
            get
            {
                return (int)NUDRejuvenation.Value;
            }
            set
            {
                PBRejuvenation.Value = value;
                NUDRejuvenation.Value = value;
            }
        }

        public int Regrowth
        {
            get
            {
                return (int)NUDRegrowth.Value;
            }
            set
            {
                PBRegrowth.Value = value;
                NUDRegrowth.Value = value;
            }
        }

        public int Lifebloom
        {
            get
            {
                return (int)NUDLifebloom.Value;
            }
            set
            {
                PBLifebloom.Value = value;
                NUDLifebloom.Value = value;
            }
        }

        public int Swiftmend
        {
            get
            {
                return (int)NUDSwiftmend.Value;
            }
            set
            {
                PBSwiftmend.Value = value;
                NUDSwiftmend.Value = value;
            }
        }

        public int TreeofLife
        {
            get
            {
                return (int)NUDTree.Value;
            }
            set
            {
                PBTree.Value = value;
                NUDTree.Value = value;
            }
        }

        public int TreeofLifePeople
        {
            get
            {
                return (int)NUDTreePeople.Value;
            }
            set
            {
                NUDTreePeople.Value = value;
            }
        }

        public int Innervate
        {
            get
            {
                return (int)NUDInnervate.Value;
            }
            set
            {
                PBInnervate.Value = value;
                NUDInnervate.Value = value;
            }
        }
        #endregion

        #endregion

        


    }
}
